-
Notifications
You must be signed in to change notification settings - Fork 452
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[antd5] add Skeleton component #103
base: master
Are you sure you want to change the base?
[antd5] add Skeleton component #103
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎ 1 Ignored Deployment
|
ccca386
to
33fde6a
Compare
33fde6a
to
b43c0f4
Compare
Hey @georg-malahov. |
@IcaroG Yes, if am not mistaken now, by using |
name: skeletonComponentName, | ||
displayName: 'Skeleton', | ||
props: { | ||
children: 'slot', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should be hidden when type !== "Node"
type: { | ||
type: 'choice', | ||
defaultValue: 'Basic', | ||
options: ['Basic', 'Button', 'Avatar', 'Input', 'Image', 'Node'], |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There should be some helpText
for Node type (e.g. please use the children
slot to add a node)
description: 'Show animation effect', | ||
defaultValue: false, | ||
}, | ||
avatar: { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Avatar placeholder needs some margin on top and left
hidden: (ps) => ps.type !== 'Basic', | ||
defaultValue: false, | ||
}, | ||
loading: { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should be true
by default, so that when you drag the Skeleton to the canvas, it shows something.
widthTitle: { | ||
type: 'string', | ||
description: 'Width of the title', | ||
hidden: (ps) => !ps.title, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should be hidden for all types other than Basic
hidden: (ps) => !ps.paragraph && ps.type !== 'Basic', | ||
advanced: true, | ||
}, | ||
rows: { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
SHould have a defaultValueHint
of 1
advanced: true, | ||
}, | ||
// SkeletonButtonProps | ||
shapeButton: { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This does nothing. Also, there's already the shape
prop that works for this purpose
customClassName: { | ||
type: 'string', | ||
displayName: 'Class Name', | ||
description: 'Custom class name for Node skeleton for custom styling', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Better use class
prop type for this.
Add support for Skeleton component.